DROP TABLE CRST_MTL_PARAMETERS;

CREATE TABLE CRST_MTL_PARAMETERS
(
  ORGANIZATION_ID                 NUMBER        NOT NULL,
  LAST_UPDATE_DATE                DATE          NOT NULL,
  LAST_UPDATED_BY                 NUMBER        NOT NULL,
  CREATION_DATE                   DATE          NOT NULL,
  CREATED_BY                      NUMBER        NOT NULL,
  LAST_UPDATE_LOGIN               NUMBER,
  ORGANIZATION_CODE               VARCHAR2(3 BYTE),
  MASTER_ORGANIZATION_ID          NUMBER        NOT NULL,
  PRIMARY_COST_METHOD             NUMBER        NOT NULL,
  COST_ORGANIZATION_ID            NUMBER        NOT NULL,
  DEFAULT_MATERIAL_COST_ID        NUMBER,
  CALENDAR_EXCEPTION_SET_ID       NUMBER,
  CALENDAR_CODE                   VARCHAR2(10 BYTE),
  GENERAL_LEDGER_UPDATE_CODE      NUMBER        NOT NULL,
  DEFAULT_ATP_RULE_ID             NUMBER,
  DEFAULT_PICKING_RULE_ID         NUMBER,
  DEFAULT_LOCATOR_ORDER_VALUE     NUMBER,
  DEFAULT_SUBINV_ORDER_VALUE      NUMBER,
  NEGATIVE_INV_RECEIPT_CODE       NUMBER        NOT NULL,
  STOCK_LOCATOR_CONTROL_CODE      NUMBER        NOT NULL,
  MATERIAL_ACCOUNT                NUMBER,
  MATERIAL_OVERHEAD_ACCOUNT       NUMBER,
  MATL_OVHD_ABSORPTION_ACCT       NUMBER,
  RESOURCE_ACCOUNT                NUMBER,
  PURCHASE_PRICE_VAR_ACCOUNT      NUMBER,
  AP_ACCRUAL_ACCOUNT              NUMBER,
  OVERHEAD_ACCOUNT                NUMBER,
  OUTSIDE_PROCESSING_ACCOUNT      NUMBER,
  INTRANSIT_INV_ACCOUNT           NUMBER,
  INTERORG_RECEIVABLES_ACCOUNT    NUMBER,
  INTERORG_PRICE_VAR_ACCOUNT      NUMBER,
  INTERORG_PAYABLES_ACCOUNT       NUMBER,
  COST_OF_SALES_ACCOUNT           NUMBER,
  ENCUMBRANCE_ACCOUNT             NUMBER,
  PROJECT_COST_ACCOUNT            NUMBER,
  INTERORG_TRANSFER_CR_ACCOUNT    NUMBER,
  MATL_INTERORG_TRANSFER_CODE     NUMBER        NOT NULL,
  INTERORG_TRNSFR_CHARGE_PERCENT  NUMBER,
  SOURCE_ORGANIZATION_ID          NUMBER,
  SOURCE_SUBINVENTORY             VARCHAR2(10 BYTE),
  SOURCE_TYPE                     NUMBER,
  ORG_MAX_WEIGHT                  NUMBER,
  ORG_MAX_WEIGHT_UOM_CODE         VARCHAR2(3 BYTE),
  ORG_MAX_VOLUME                  NUMBER,
  ORG_MAX_VOLUME_UOM_CODE         VARCHAR2(3 BYTE),
  SERIAL_NUMBER_TYPE              NUMBER,
  AUTO_SERIAL_ALPHA_PREFIX        VARCHAR2(30 BYTE),
  START_AUTO_SERIAL_NUMBER        VARCHAR2(30 BYTE),
  AUTO_LOT_ALPHA_PREFIX           VARCHAR2(30 BYTE),
  LOT_NUMBER_UNIQUENESS           NUMBER        NOT NULL,
  LOT_NUMBER_GENERATION           NUMBER        NOT NULL,
  LOT_NUMBER_ZERO_PADDING         NUMBER,
  LOT_NUMBER_LENGTH               NUMBER,
  STARTING_REVISION               VARCHAR2(3 BYTE) NOT NULL,
  ATTRIBUTE_CATEGORY              VARCHAR2(30 BYTE),
  ATTRIBUTE1                      VARCHAR2(150 BYTE),
  ATTRIBUTE2                      VARCHAR2(150 BYTE),
  ATTRIBUTE3                      VARCHAR2(150 BYTE),
  ATTRIBUTE4                      VARCHAR2(150 BYTE),
  ATTRIBUTE5                      VARCHAR2(150 BYTE),
  ATTRIBUTE6                      VARCHAR2(150 BYTE),
  ATTRIBUTE7                      VARCHAR2(150 BYTE),
  ATTRIBUTE8                      VARCHAR2(150 BYTE),
  ATTRIBUTE9                      VARCHAR2(150 BYTE),
  ATTRIBUTE10                     VARCHAR2(150 BYTE),
  ATTRIBUTE11                     VARCHAR2(150 BYTE),
  ATTRIBUTE12                     VARCHAR2(150 BYTE),
  ATTRIBUTE13                     VARCHAR2(150 BYTE),
  ATTRIBUTE14                     VARCHAR2(150 BYTE),
  ATTRIBUTE15                     VARCHAR2(150 BYTE),
  DEFAULT_DEMAND_CLASS            VARCHAR2(30 BYTE),
  ENCUMBRANCE_REVERSAL_FLAG       NUMBER,
  MAINTAIN_FIFO_QTY_STACK_TYPE    NUMBER,
  INVOICE_PRICE_VAR_ACCOUNT       NUMBER,
  AVERAGE_COST_VAR_ACCOUNT        NUMBER,
  SALES_ACCOUNT                   NUMBER,
  EXPENSE_ACCOUNT                 NUMBER,
  SERIAL_NUMBER_GENERATION        NUMBER        NOT NULL,
  REQUEST_ID                      NUMBER,
  PROGRAM_APPLICATION_ID          NUMBER,
  PROGRAM_ID                      NUMBER,
  PROGRAM_UPDATE_DATE             DATE,
  GLOBAL_ATTRIBUTE_CATEGORY       VARCHAR2(30 BYTE),
  GLOBAL_ATTRIBUTE1               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE2               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE3               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE4               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE5               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE6               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE7               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE8               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE9               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE10              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE11              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE12              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE13              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE14              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE15              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE16              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE17              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE18              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE19              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE20              VARCHAR2(150 BYTE),
  MAT_OVHD_COST_TYPE_ID           NUMBER,
  PROJECT_REFERENCE_ENABLED       NUMBER,
  PM_COST_COLLECTION_ENABLED      NUMBER,
  PROJECT_CONTROL_LEVEL           NUMBER,
  AVG_RATES_COST_TYPE_ID          NUMBER,
  TXN_APPROVAL_TIMEOUT_PERIOD     NUMBER,
  MO_SOURCE_REQUIRED              NUMBER,
  MO_PICK_CONFIRM_REQUIRED        NUMBER,
  MO_APPROVAL_TIMEOUT_ACTION      NUMBER,
  BORRPAY_MATL_VAR_ACCOUNT        NUMBER,
  BORRPAY_MOH_VAR_ACCOUNT         NUMBER,
  BORRPAY_RES_VAR_ACCOUNT         NUMBER,
  BORRPAY_OSP_VAR_ACCOUNT         NUMBER,
  BORRPAY_OVH_VAR_ACCOUNT         NUMBER,
  PROCESS_ENABLED_FLAG            VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
  PROCESS_ORGN_CODE               VARCHAR2(4 BYTE),
  WSM_ENABLED_FLAG                VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
  DEFAULT_COST_GROUP_ID           NUMBER        NOT NULL,
  LPN_PREFIX                      VARCHAR2(10 BYTE),
  LPN_SUFFIX                      VARCHAR2(10 BYTE),
  LPN_STARTING_NUMBER             NUMBER,
  WMS_ENABLED_FLAG                VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
  PREGEN_PUTAWAY_TASKS_FLAG       NUMBER,
  REGENERATION_INTERVAL           NUMBER,
  TIMEZONE_ID                     NUMBER,
  MAX_PICKS_BATCH                 NUMBER,
  DEFAULT_WMS_PICKING_RULE_ID     NUMBER,
  DEFAULT_PUT_AWAY_RULE_ID        NUMBER,
  DEFAULT_TASK_ASSIGN_RULE_ID     NUMBER,
  DEFAULT_LABEL_COMP_RULE_ID      NUMBER,
  DEFAULT_CARTON_RULE_ID          NUMBER,
  DEFAULT_CYC_COUNT_HEADER_ID     NUMBER,
  CROSSDOCK_FLAG                  NUMBER,
  CARTONIZATION_FLAG              NUMBER,
  COST_CUTOFF_DATE                DATE,
  ENABLE_COSTING_BY_CATEGORY      VARCHAR2(1 BYTE),
  COST_GROUP_ACCOUNTING           NUMBER,
  ALLOCATE_SERIAL_FLAG            VARCHAR2(1 BYTE),
  DEFAULT_PICK_TASK_TYPE_ID       NUMBER,
  DEFAULT_CC_TASK_TYPE_ID         NUMBER,
  DEFAULT_PUTAWAY_TASK_TYPE_ID    NUMBER,
  DEFAULT_REPL_TASK_TYPE_ID       NUMBER,
  EAM_ENABLED_FLAG                VARCHAR2(1 BYTE),
  MAINT_ORGANIZATION_ID           NUMBER,
  PRIORITIZE_WIP_JOBS             NUMBER,
  DEFAULT_CROSSDOCK_SUBINVENTORY  VARCHAR2(10 BYTE),
  SKIP_TASK_WAITING_MINUTES       NUMBER,
  QA_SKIPPING_INSP_FLAG           VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
  DEFAULT_CROSSDOCK_LOCATOR_ID    NUMBER,
  DEFAULT_MOXFER_TASK_TYPE_ID     NUMBER,
  DEFAULT_MOISSUE_TASK_TYPE_ID    NUMBER,
  DEFAULT_MATL_OVHD_COST_ID       NUMBER,
  DISTRIBUTED_ORGANIZATION_FLAG   VARCHAR2(1 BYTE),
  CARRIER_MANIFESTING_FLAG        VARCHAR2(1 BYTE),
  DISTRIBUTION_ACCOUNT_ID         NUMBER,
  DIRECT_SHIPPING_ALLOWED         VARCHAR2(1 BYTE),
  DEFAULT_PICK_OP_PLAN_ID         NUMBER,
  MAX_CLUSTERS_ALLOWED            NUMBER,
  CONSIGNED_FLAG                  VARCHAR2(1 BYTE),
  CARTONIZE_SALES_ORDERS          VARCHAR2(1 BYTE),
  CARTONIZE_MANUFACTURING         VARCHAR2(1 BYTE)
);
